<script type="text/javascript" src="plugins/SitesManager/templates/SitesManager.js"></script>

<h2>{'SitesManager_Sites'|translate}</h2>
<div id="ajaxError" style="display:none"></div>
<div id="ajaxLoading" style="display:none">{'SitesManager_Loading'|translate}<img src="themes/default/loading.gif"></div>

{if $sites|@count == 0}
	{'SitesManager_NoWebsite'|translate}
{else}
	<table id="editSites" border=1 cellpadding="10">
		<thead>
			<tr>
			<th>{'SitesManager_ID'|translate}</th>
			<th>{'SitesManager_Name'|translate}</th>
			<th>{'SitesManager_URLs'|translate}</th>
			<th> </th>
			<th> </th>
			<th>{'SitesManager_JSCode'|translate}</th>
			</tr>
		</thead>
		<tbody>
			{foreach from=$sites key=i item=site}
			<tr id="row{$i}">
				<td id="idSite">{$site.idsite}</td>
				<td id="siteName" class="editableSite">{$site.name}</td>
				<td id="urls" class="editableSite">{foreach from=$site.alias_urls item=url}{$url}<br>{/foreach}</td>       
				<td><img src='plugins/UsersManager/images/edit.png' class="editSite" id="row{$i}" href='#'></td>
				<td><img src='plugins/UsersManager/images/remove.png' class="deleteSite" id="row{$i}" value="Delete"></td>
				<td><a href='{url actionToLoad=displayJavascriptCode idsite=$site.idsite}'>{'SitesManager_ShowCode'|translate}</a></td>
			</tr>
			{/foreach}
			
		</tbody>
	</table>
	<div id="addRowSite"><img src='plugins/UsersManager/images/add.png'> <a href="#">{'SitesManager_AddANewSite'|translate}</a></div>
{/if}

